import moment from 'moment'

export const columns = [
  {
    title: '新增账号',
    prop: 'reg_account',
    img: '@/assets/navCardImg/add_account.png',
    type: 'day'
  },
  {
    title: '新增付费账号',
    prop: 'fee_new_account',
    img: '@/assets/navCardImg/new_pay_account.png',
    type: 'day'
  },
  {
    title: '新增付费总额',
    key: 'total_fee_new_account',
    img: '@/assets/navCardImg/order_amount_new.png',
    type: 'day'
  },
  {
    title: '当月新增账号总数',
    key: 'month_reg_account',
    img: '@/assets/navCardImg/new_total_user.png',
    type: 'month'
  },
  {
    title: '活跃账号数',
    key: 'login_account',
    img: '@/assets/navCardImg/act_account.png',
    type: 'day'
  },
  {
    title: '账号付费总数',
    key: 'fee_account',
    img: '@/assets/navCardImg/new_fee_account.png',
    type: 'day'
  },
  {
    title: '账号付费总额',
    key: 'total_fee_balance',
    img: '@/assets/navCardImg/order_payment.png',
    type: 'day'
  },
  {
    title: '当月付费总额',
    key: 'month_fee_balance',
    img: '@/assets/navCardImg/total_amount.png',
    type: 'month'
  }
]
export const formatDate = (num = 0, format = 'YYYY-MM-DD') => {
  const start = new Date().getTime() - 1000 * 3600 * 24 * num
  const day = moment(start).format(format)
  return day
}
// 判断当天日期是周几
export const todayWeek = () => {
  var arr = ['日', '一', '二', '三', '四', '五', '六']
  var week = new Date().getDay()
  return arr[week]
}
